<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class LocaleComponent</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> LocaleComponent</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The Locale-Component Class</p>
		<p class="notes">
			Located in <a class="field" href="_kata---lib---controllers---components---locale.php.html">/kata/lib/controllers/components/locale.php</a> (line <span class="field">38</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">array</span>
					<a href="#$components" title="details" class="var-name">$components</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">object</span>
					<a href="#$controller" title="details" class="var-name">$controller</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																								<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#doesLanguageExist" title="details" class="method-name">doesLanguageExist</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$lang</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#escapeHtml" title="details" class="method-name">escapeHtml</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$html</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#findLanguage" title="details" class="method-name">findLanguage</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#getAcceptedLanguages" title="details" class="method-name">getAcceptedLanguages</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#getBrowserLang" title="details" class="method-name">getBrowserLang</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#getCode" title="details" class="method-name">getCode</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#getMessageArray" title="details" class="method-name">&amp;getMessageArray</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#getMessages" title="details" class="method-name">getMessages</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#getString" title="details" class="method-name">getString</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$messageArgs</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#getStringInternal" title="details" class="method-name">getStringInternal</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$messageArgs</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#getTldFromLanguage" title="details" class="method-name">getTldFromLanguage</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$langcode</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#getVhostLang" title="details" class="method-name">getVhostLang</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$useTld</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#safeGetString" title="details" class="method-name">safeGetString</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$messageArgs</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setCode" title="details" class="method-name">setCode</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$code</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#startup" title="details" class="method-name">startup</a>
											(<span class="var-type">object</span>&nbsp;<span class="var-name">$controller</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$components" id="$components"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$components</span>
			 = <span class="var-default">array ()</span>			(line <span class="line-number">49</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">array of strings of component-names this component needs to function. null or false if none.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$controller" id="$controller"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">object</span>
			<span class="var-name">$controller</span>
			 = <span class="var-default"> false</span>			(line <span class="line-number">43</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">placeholder for controller that owns this component</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
														<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methoddoesLanguageExist" id="doesLanguageExist"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">doesLanguageExist</span> (line <span class="line-number">256</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			doesLanguageExist
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$lang</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$lang</span>			</li>
				</ul>
		
			
	</div>
<a name="methodescapeHtml" id="escapeHtml"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">escapeHtml</span> (line <span class="line-number">101</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns html with h()ed entities and tags. entities are _not_ double-encoded, certain tags survive als html</p>
	<ul class="tags">
				<li><span class="field">return:</span> html with</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			escapeHtml
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$html</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$html</span><span class="var-description">: raw html with umlauts</span>			</li>
				</ul>
		
			
	</div>
<a name="methodfindLanguage" id="findLanguage"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">findLanguage</span> (line <span class="line-number">269</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">find the startup-language by looking at the LANGUAGE define in core/config.php</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			findLanguage
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetAcceptedLanguages" id="getAcceptedLanguages"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getAcceptedLanguages</span> (line <span class="line-number">261</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getAcceptedLanguages
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetBrowserLang" id="getBrowserLang"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getBrowserLang</span> (line <span class="line-number">299</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">try to find an language that we have as a file and that has a high priority in the users browser.</p>
<p class="description"><p>returns EN if anything fails</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> short iso-code</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getBrowserLang
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetCode" id="getCode"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getCode</span> (line <span class="line-number">220</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getCode
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetMessageArray" id="getMessageArray"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getMessageArray</span> (line <span class="line-number">380</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">return the array containing all locale-codes by reference</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			&amp;getMessageArray
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetMessages" id="getMessages"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getMessages</span> (line <span class="line-number">391</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">load the message-array by loading controllers/lang/XX.php</p>
<p class="description"><p>tries to cache the array via APC (if loaded)</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getMessages
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetString" id="getString"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getString</span> (line <span class="line-number">173</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">return the translation for the given string-identifier. throws expetions (if DEBUG&gt;0) if key is missing or wrong parameters.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getString
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$messageArgs</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span><span class="var-description">: identifier to look up translation</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$messageArgs</span><span class="var-description">: optional parameters that will be formatted into the string with printf</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetStringInternal" id="getStringInternal"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getStringInternal</span> (line <span class="line-number">112</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getStringInternal
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$messageArgs</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$id</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$messageArgs</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetTldFromLanguage" id="getTldFromLanguage"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getTldFromLanguage</span> (line <span class="line-number">487</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">map given DINISO to language-tld-code code for setLocale()</p>
	<ul class="tags">
				<li><span class="field">return:</span> language-code</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getTldFromLanguage
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$langcode</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$langcode</span><span class="var-description">: DINISO-code</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetVhostLang" id="getVhostLang"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getVhostLang</span> (line <span class="line-number">353</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">try to find an language that we have as a file depending on the current domain name</p>
<p class="description"><p>foo.example.tr -&gt; &quot;tr&quot;  [foo.bar.]tr.example.com -&gt; &quot;tr&quot;</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getVhostLang
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$useTld</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$useTld</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsafeGetString" id="safeGetString"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">safeGetString</span> (line <span class="line-number">185</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			safeGetString
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$messageArgs</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$id</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$messageArgs</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetCode" id="setCode"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">setCode</span> (line <span class="line-number">198</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">sets a language-code. writes the code into the session of the user</p>
<p class="description"><p>and sets Lang_Code for all views</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setCode
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$code</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$code</span><span class="var-description">: short iso-code for language (&quot;de&quot; &quot;en&quot; &quot;fr&quot;)</span>			</li>
				</ul>
		
			
	</div>
<a name="methodstartup" id="startup"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">startup</span> (line <span class="line-number">74</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">called by controller after the component was instanciated first</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			startup
		</span>
					(<span class="var-type">object</span>&nbsp;<span class="var-name">$controller</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">object</span>
				<span class="var-name">$controller</span><span class="var-description">: the calling controller</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Wed, 13 Jan 2010 16:25:47 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</div></body>
</html>